## Clayton, Horrillo, and Sniderman 
## The BIAT and the AMP As Measures of Racial Prejudice in Political Science: A Methodological Assessment
## Additional analyses

# Initial settings --------------------------------------------------------

rm(list = ls())
library(tidyverse)
library(scales)
library(estimatr)

# Read data ---------------------------------------------------------------

panel <- read.csv("output/main_panel.csv")
panel_cleaned <- panel %>% 
  mutate(IAT_D = rescale(IAT_D, to = c(0,1)),
         diff = rescale(diff, to = c(0,1)),
         pid = rescale(pid, to = c(0,1)),
         rr_index = rescale(rr_index, to = c(0,1)))

table(panel$obama)

# Analysis ----------------------------------------------------------------

summary(lm_robust(obama ~ IAT_D + pid + rr_index, data = panel))
summary(lm_robust(obama ~ diff + pid + rr_index, data = panel))

